<template>
  <el-card>
    <h2 style="margin-bottom: 20px;">标签管理</h2>
    <el-table :data="tags" style="width: 100%">
      <el-table-column prop="id" label="ID" width="80" />
      <el-table-column prop="name" label="标签名称" />
      <el-table-column prop="usage_count" label="使用次数" width="120" />
    </el-table>
  </el-card>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { fetchAllTags } from '@/api/tag'

const tags = ref([])

const loadTags = async () => {
  const res = await fetchAllTags()
  tags.value = res.data
}

onMounted(loadTags)
</script>


